%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/rbac.updateLeftArm"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 14, 26, 15, 17<br /><br />1: PgUpdateSingle[11]<br />2: <br />ᐳ: Object[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 16, 11, 17<br /><br />ROOT Object{1}ᐸ{result}ᐳ[16]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 11, 17<br /><br />ROOT PgUpdateSingle{1}ᐸleft_arm(id;)ᐳ[11]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ47ᐳ[26]"}}:::plan
    __InputObject9{{"__InputObject[9∈0] ➊<br />More deps:<br />- Constantᐸ'jovial'ᐳ[27]"}}:::plan
    __InputObject9 --> __InputObject6
    Object14{{"Object[14∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access12 & Access13 --> Object14
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access12
    __Value2 --> Access13
    ApplyInput15{{"ApplyInput[15∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput15
    PgUpdateSingle11[["PgUpdateSingle[11∈1] ➊<br />ᐸleft_arm(id;)ᐳ<br />More deps:<br />- Constantᐸ47ᐳ[26]"]]:::sideeffectplan
    Object14 & ApplyInput15 --> PgUpdateSingle11
    Object16{{"Object[16∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgUpdateSingle11 --> Object16
    List20{{"List[20∈3] ➊<br />ᐸ17,18ᐳ<br />More deps:<br />- Constantᐸ'left_arms'ᐳ[17]"}}:::plan
    PgClassExpression18{{"PgClassExpression[18∈3] ➊<br />ᐸ__left_arm__.”id”ᐳ"}}:::plan
    PgClassExpression18 --> List20
    Access19{{"Access[19∈3] ➊<br />ᐸ11.tᐳ"}}:::plan
    Access19 --> PgClassExpression18
    PgUpdateSingle11 --> Access19
    Lambda21{{"Lambda[21∈3] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List20 --> Lambda21
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__left_arm...person_id”ᐳ"}}:::plan
    Access19 --> PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__left_arm...in_metres”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression24
    PgClassExpression25{{"PgClassExpression[25∈3] ➊<br />ᐸ__left_arm__.”mood”ᐳ"}}:::plan
    PgClassExpression24 o--o PgClassExpression25

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject9,Access12,Access13,Object14,ApplyInput15 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgUpdateSingle11,Object16 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression18,Access19,List20,Lambda21,PgClassExpression23,PgClassExpression24,PgClassExpression25 bucket3

